<%--
  Created by IntelliJ IDEA.
  User: Baggio
  Date: 2017-7-3
  Time: 11:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%@ include file="/common/include-core.jsp" %>

    <title>卡券列表</title>

</head>
<body>

<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 卡劵管理 <span
        class="c-gray en">&gt;</span> 卡劵列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
                                              href="javascript:location.replace(location.href);" title="刷新"><i
        class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <div class="text-c">
        <form action="/certificate/certificateList.html" method="post" id="searchForm">
            <input type="hidden" id="count" value="${pageinfo.total }"/>
            <input type="hidden" id="page" name="page" value="${pageinfo.pageNum }"/>
            <input type="hidden" id="pageSize" name="pageSize" value="${pageinfo.pageSize }"/>
            <input type="text" name="certificateId" value="${bean.certificateId }" placeholder=" 请输入你要查询的卡券编号"
                   style="width:250px" class="input-text">
            <button name="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
        </form>
    </div>
    <%--<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"> <a class="btn btn-primary radius" onclick="picture_edit('新增卡劵','/activity/activity','')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 新增卡劵</a></span> &lt;%&ndash;<span class="r">共有数据：<strong>54</strong> 条</span> &ndash;%&gt;</div>--%>
    <div class="mt-20 portfolio-content">
        <table class="table table-border table-bordered table-bg table-hover table-sort">
            <thead>
            <tr class="text-c">

                <th>序号</th>
                <th>卡券编号</th>
                <th>余额或次数</th>
                <th>开始时间</th>
                <th>结束时间</th>
                <th>状态</th>
                <%--<th>操作</th>--%>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${pageinfo.list}" var="item" varStatus="index">
                <tr class="text-c">
                    <td>${index.index+1}</td>
                    <td>${item.certificateId}</td>
                    <td>${item.balance}</td>
                    <td>
                        <c:if test="${item.certificateStartDate==null}">
                            该卡券未激活！
                        </c:if>
                        <fmt:formatDate value="${item.certificateStartDate}" pattern="yyyy-MM-dd"/>
                    </td>
                    <td>
                        <c:if test="${item.certificateEndDate==null}">
                            该卡券未激活！
                        </c:if>
                        <fmt:formatDate value="${item.certificateEndDate}" pattern="yyyy-MM-dd"/>
                    </td>


                    <td class="td-status">
                        <c:if test="${item.status==-2}"><span class="label label-defaunt radius">无效-未领用</span></c:if>
                        <c:if test="${item.status==-1}"><span class="label label-defaunt radius">有效-未领用</span></c:if>
                        <c:if test="${item.status==0}"><span class="label label-success radius">未激活</span></c:if>
                        <c:if test="${item.status==1}"><span class="label label-success radius">有效-已激活</span></c:if>
                        <c:if test="${item.status==2}"><span class="label label-success radius">使用中</span></c:if>
                        <c:if test="${item.status==3}"><span class="label label-success radius">已使用</span></c:if>
                    </td>
                        <%--<td class="td-manage">
                            <a style="text-decoration:none" class="ml-5" onClick="picture_edit('卡劵编辑','/activity/activity?id=${item.tid}','')"
                               href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a>
                        </td>--%>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <div id="demo" class="ui-page tr mt10" style="float: right;margin-top: 10px;margin-bottom: 10px"></div>
    </div>
</div>
</body>
</html>
<%@ include file="/common/include-footer.jsp" %>